<%--
 *  File:   uploadHeader.jsp
 *  Desc: 
 *
 *  Date	  :	 2013/05/31        		    
 *  Author	:  jeanhuang		
 *
 *  Copyright (C) 2000 - 2007 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  String strModuleName = "IMG";
  String privilegeCode = "IMG0303";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/CommonHeader.inc"%>

<html>
<head>
<title></title>
<PageFlow:CheckPageFlow pageName="p_uploadconfigheader" />
<%@ include file="/inc/CatchError.inc"%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css"
	type="text/css">
<script language="JavaScript"
	src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/PopWindow.js"></script>
<%
  String strId="";
String tablename="";
  HashMap hmTmp=(HashMap)pageContext.getAttribute("uploadconfighash");
  if(hmTmp==null)
    hmTmp=new HashMap();
  if(hmTmp.get("uploadconfigid")!=null){
    strId=((Integer)hmTmp.get("uploadconfigid")).toString();
    tablename= (String)hmTmp.get("tablename");
  }
  
%>

<script language="JavaScript">
var isnewfileruleconfig=null;
function checkfileruleconfigid(){
	var strid = '<%=strId %>';
	
	if(strid != null && strid != ''){
		isnewfileruleconfig=true;
	}else{ 
		isnewfileruleconfig = false;
	}
}

function clicked(obj)
{ 
  var url = "";
  var params = '&uploadconfigid=<%=strId %>&displayflag=<%=request.getParameter("displayflag")%>';
 	if(isnewfileruleconfig == null){
 		checkfileruleconfigid();
 	}

 	if(isnewfileruleconfig){
	  	if (obj.id == "A01"){
		  	url = "uploadconfigmain.jsp?<%= OvalTools.randomURL() %>"+params ;
	  	}else if (obj.id == "A02"){
	    	url = "uploadtableconfigedit.jsp?<%= OvalTools.randomURL() %>" + params+"&tablenameship=<%=tablename %>";
	  	}else if (obj.id == "A03"){
	    	url = "uploadcolumnconfiger.jsp?<%= OvalTools.randomURL() %>" + params;
	  	}else if (obj.id == "A04"){
		  	//alert("4");
	    	url = "uploadColumnCheckFrm.jsp?<%= OvalTools.randomURL() %>" + params;
	  	}
	  	parent.down.location.href=url;
	  	return true;
  	}else{
  		alert("<%= message.getMessageDesc("SAVE_MAIN_INO_FIRST") %>");
   		return false;
  	}
}

function page_back(){
	parent.location.href="uploadConfigSummary.jsp";
}

function setVendorDisplay(display){
	var vendorTab = document.getElementById('A03');
	
	vendorTab.style.display = display;
}


</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<%--	form elements	--%>

<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
<input type="hidden" name="pagename" value="p_uploadconfigheader">
<input type="hidden" name="actionname">


<div id=div1><%--	header title	--%>

<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="summary_top"></td>
	</tr>
	<tr>
		<td class="td_center"><span class="title-big-b-center"><%= label.getLabelName("L_UploadConfig")%></span></td>
	</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0"
	style="position: absolute; bottom: 0;">
	<tr>
		<td class="summary_top"></td>
	</tr>


	<%--	header descriptions	--%>

	<tr>
		<td class="td_right">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td><span class="b"><%= label.getLabelName("L_UploadConfig") + label.getLabelName("L_Colon") %><custom:write
					property="code" name="uploadconfighash" />&nbsp;&nbsp;<custom:write
					property="name" name="uploadconfighash" /></span></td>
			</tr>
		</table>
		</td>
	</tr>


	<%--	all tabs	--%>
	<%
 		Vector vec = new Vector();
 		HashMap tabHash = new HashMap();

 		tabHash.put("id","A01");
 		tabHash.put("label","L_BasicInfo");
 		vec.add(tabHash);

    	tabHash = new HashMap();
    	tabHash.put("id","A02");
 		tabHash.put("label","L_ManyTableConfig");
 		vec.add(tabHash);

 		tabHash = new HashMap();
    	tabHash.put("id","A03");
 		tabHash.put("label","L_ColumnConfig");
 		vec.add(tabHash);
 		
 		tabHash = new HashMap();
    	tabHash.put("id","A04");
 		tabHash.put("label","L_RuleConfig");
 		vec.add(tabHash);
 		
 	%>
	<tr>
		<td><custom:tab vecAttr="<%=vec%>" defaultID="A01"
			privilegeCode="IMG0303" /></td>
	</tr>

</table>
</div>
</body>
</html>